package com.example.test.主方法运行测试;


import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.json.JSONUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class mainsdfs {
    public static void main(String[] args) {

        ArrayList<Integer> integers = CollectionUtil.newArrayList(1, 2, 3, 4, 5, 6);

        List<Integer> collect = integers.stream().filter(integer -> !integer.equals(2)).collect(Collectors.toList());

        System.out.println(JSONUtil.toJsonStr(collect));


    }

}
